import { hanldeResult } from '../models';

export default (server) => {
	server.get('/home/routers', (schema, request) => {
		let res = schema.find('system', '/home/routers');
		return hanldeResult(res);
	});
	server.post('/auth/login', (schema, request) => {
		let res = schema.find('system', '/auth/login');
		return hanldeResult(res);
	});
	server.post('/auth/logout', (schema, request) => {
		let res = schema.find('system', '/auth/logout');
		return hanldeResult(res);
	});
	server.get('/system/user/profile/info', (schema, request) => {
		let res = schema.find('system', '/system/user/profile/info');
		return hanldeResult(res);
	});
	server.get('/captcha/image', (schema, request) => {
		let res = schema.find('system', '/captcha/image');
		return hanldeResult(res);
	});
	server.get('/system/dict/data/use/list/sys_yes_no', (schema, request) => {
		let res = schema.find('system', '/system/dict/data/use/list/sys_yes_no');
		return hanldeResult(res);
	});
	server.get('/system/config/page', (schema, request) => {
		let res = schema.find('system', '/system/config/page');
		return hanldeResult(res);
	});
	server.get('/system/dict/type/page', (schema, request) => {
		let res = schema.find('system', '/system/dict/type/page');
		return hanldeResult(res);
	});

	server.get('/system/dict/data/page', (schema, request) => {
		let res = schema.find('system', '/system/dict/data/page');
		return hanldeResult(res);
	});
	server.get('/system/dict/data/use/list/sys_normal_disable', (schema, request) => {
		let res = schema.find('system', '/system/dict/data/use/list/sys_normal_disable');
		return hanldeResult(res);
	});
};
